package com.khyr.controller;

import com.khyr.entity.DictData;
import com.khyr.service.DictDataService;
import com.khyr.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @className: DictDataController
 * @author: Zyl
 * @date: 2025/3/11 21:13
 * @Version: 1.0
 * @description:
 */

@RestController
@RequestMapping("/system/dictData")
public class DictDataController {

    @Autowired
    private DictDataService dictDataService;

    @GetMapping("/{dictType}")
    public R<List<DictData>> getDictDataByType(@PathVariable String dictType){
        return dictDataService.getByDictType(dictType);
    }
}
